package com.ycp.erp.warehouse.ui.binder;

import android.widget.RelativeLayout;
import android.widget.TextView;

import com.one.common.view.multitytype.adapter.BaseItemBinder;
import com.one.common.view.multitytype.adapter.BaseViewHolderMulti;
import com.one.common.view.widget.ClearEditView;
import com.ycp.erp.R;
import com.ycp.erp.warehouse.model.bean.ProcurementWarehouse;

import androidx.annotation.NonNull;

/**
 * Class Des:
 * Created by bjh on 2021/8/24.
 */
public class ConfirmPWarehouseBinder extends BaseItemBinder<ProcurementWarehouse> {
    TextView tvTitle;
    TextView tvDesc;
    TextView tvGoodsPrice;
    TextView tvNum;
    ClearEditView etRemark;
    RelativeLayout rlTop;
    public ConfirmPWarehouseBinder() {
        super(R.layout.item_confirm_p_warehouse);
    }

    @Override
    protected void bindView(@NonNull BaseViewHolderMulti holder, ProcurementWarehouse item) {
        tvTitle= holder.getView(R.id.tvTitle);
        tvDesc= holder.getView(R.id.tvDesc);
        tvGoodsPrice= holder.getView(R.id.tvGoodsPrice);
        etRemark= holder.getView(R.id.etRemark);
        tvTitle= holder.getView(R.id.tvTitle);
        tvNum= holder.getView(R.id.tvGoodsNum);
        tvTitle.setText(item.getGoodsName());
        tvGoodsPrice.setText(String.format("￥%s", item.getGoodsPrice()));
        tvDesc.setText(item.getGoodsDesc());
        tvNum.setText(String.format("%s", item.getGoodsNum()));
    }
}
